Optimal. Leaf size=95 \[ -\frac {i c^4 \tan ^2(e+f x)}{2 a f}+\frac {5 c^4 \tan (e+f x)}{a f}+\frac {8 i c^4}{f (a+i a \tan (e+f x))}-\frac {12 i c^4 \log (\cos (e+f x))}{a f}-\frac {12 c^4 x}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3522, 3487, 43} \[ -\frac {i c^4 \tan ^2(e+f x)}{2 a f}+\frac {5 c^4 \tan (e+f x)}{a f}+\frac {8 i c^4}{f (a+i a \tan (e+f x))}-\frac {12 i c^4 \log (\cos (e+f x))}{a f}-\frac {12 c^4 x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 3487
Rule 3522
Rubi steps
\begin {align*} \int \frac {(c-i c \tan (e+f x))^4}{a+i a \tan (e+f x)} \, dx &=\left (a^4 c^4\right ) \int \frac {\sec ^8(e+f x)}{(a+i a \tan (e+f x))^5} \, dx\\ &=-\frac {\left (i c^4\right ) \operatorname {Subst}\left (\int \frac {(a-x)^3}{(a+x)^2} \, dx,x,i a \tan (e+f x)\right )}{a^3 f}\\ &=-\frac {\left (i c^4\right ) \operatorname {Subst}\left (\int \left (5 a-x+\frac {8 a^3}{(a+x)^2}-\frac {12 a^2}{a+x}\right ) \, dx,x,i a \tan (e+f x)\right )}{a^3 f}\\ &=-\frac {12 c^4 x}{a}-\frac {12 i c^4 \log (\cos (e+f x))}{a f}+\frac {5 c^4 \tan (e+f x)}{a f}-\frac {i c^4 \tan ^2(e+f x)}{2 a f}+\frac {8 i c^4}{f (a+i a \tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 3.00, size = 194, normalized size = 2.04 \[ \frac {c^4 \cos (e) \sec (e+f x) (\cos (f x)+i \sin (f x)) \left (-24 i (\tan (e)-i) \tan ^{-1}(\tan (f x))-24 f x \tan ^2(e)+24 f x \sec ^2(e)-i \sec ^2(e+f x)-8 i \tan (e) \sin (2 f x)-12 i \log \left (\cos ^2(e+f x)\right )+8 (\tan (e)+i) \cos (2 f x)+\tan (e) \sec ^2(e+f x)+10 \sec (e) \sin (f x) \sec (e+f x)+12 \tan (e) \log \left (\cos ^2(e+f x)\right )+10 i \tan (e) \sec (e) \sin (f x) \sec (e+f x)-24 f x+8 \sin (2 f x)\right )}{2 f (a+i a \tan (e+f x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.51, size = 167, normalized size = 1.76 \[ -\frac {24 \, c^{4} f x e^{\left (6 i \, f x + 6 i \, e\right )} - 4 i \, c^{4} + {\left (48 \, c^{4} f x - 12 i \, c^{4}\right )} e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (24 \, c^{4} f x - 18 i \, c^{4}\right )} e^{\left (2 i \, f x + 2 i \, e\right )} - {\left (-12 i \, c^{4} e^{\left (6 i \, f x + 6 i \, e\right )} - 24 i \, c^{4} e^{\left (4 i \, f x + 4 i \, e\right )} - 12 i \, c^{4} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{a f e^{\left (6 i \, f x + 6 i \, e\right )} + 2 \, a f e^{\left (4 i \, f x + 4 i \, e\right )} + a f e^{\left (2 i \, f x + 2 i \, e\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.29, size = 200, normalized size = 2.11 \[ \frac {2 \, {\left (-\frac {6 i \, c^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a} + \frac {12 i \, c^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}{a} - \frac {6 i \, c^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{a} - \frac {13 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 9 i \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 24 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 9 i \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 13 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - i \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{2} a}\right )}}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.18, size = 83, normalized size = 0.87 \[ \frac {5 c^{4} \tan \left (f x +e \right )}{a f}-\frac {i c^{4} \left (\tan ^{2}\left (f x +e \right )\right )}{2 a f}+\frac {8 c^{4}}{f a \left (\tan \left (f x +e \right )-i\right )}+\frac {12 i c^{4} \ln \left (\tan \left (f x +e \right )-i\right )}{f a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.68, size = 85, normalized size = 0.89 \[ \frac {5\,c^4\,\mathrm {tan}\left (e+f\,x\right )}{a\,f}+\frac {c^4\,8{}\mathrm {i}}{a\,f\,\left (1+\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}-\frac {c^4\,{\mathrm {tan}\left (e+f\,x\right )}^2\,1{}\mathrm {i}}{2\,a\,f}+\frac {c^4\,\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,12{}\mathrm {i}}{a\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.50, size = 175, normalized size = 1.84 \[ \frac {8 i c^{4} e^{2 i e} e^{2 i f x} + 10 i c^{4}}{a f e^{4 i e} e^{4 i f x} + 2 a f e^{2 i e} e^{2 i f x} + a f} + \begin {cases} \frac {4 i c^{4} e^{- 2 i e} e^{- 2 i f x}}{a f} & \text {for}\: a f e^{2 i e} \neq 0 \\x \left (\frac {24 c^{4}}{a} + \frac {\left (- 24 c^{4} e^{2 i e} + 8 c^{4}\right ) e^{- 2 i e}}{a}\right ) & \text {otherwise} \end {cases} - \frac {24 c^{4} x}{a} - \frac {12 i c^{4} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{a f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________